/**
* Copyright (c) 2016-2100 yunclouds
*/
package com.yunqian.redot.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunqian.redot.constant.Tables;
import com.yunqian.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 课程管理
 *
 * @author zsy
 * 2018-09-29 15:54:02
 */
@Data
@Entity
@Table(name = Tables.COURSES)
@EqualsAndHashCode(callSuper = false)
public class Courses extends BaseModel<Long>{
    
    /**状态 1-未开始，2-报名中，3-已结束*/
    @Column(name = "status")
    private Integer status = 1;
    /**备注*/
    @Column(name = "remark")
    private String remark;
    /**排序号*/
    @Column(name = "sort_num")
    private Integer sortNum;
    /**名称*/
    @Column(name = "title")
    private String title;
    /**图Key*/
    @Column(name = "img_key")
    private String imgKey;
    /**小程序链接-预留字段*/
    @Column(name = "applet_url")
    private String appletUrl;
    /**简介*/
    @Column(name = "description")
    private String description;
    /**票价*/
    @Column(name = "price")
    private BigDecimal price;
    /**报名开始时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "begin_time")
    private Date beginTime;
    /**报名结束时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "end_time")
    private Date endTime;
    /**实际结束时间*/
    @Column(name = "real_end_time")
    private Date realEndTime;
    /**报名人数*/
    @Column(name = "quantity")
    private Integer quantity;


    public Courses() {
    }

}
